library TestJavaDll;

uses
  SysUtils,
  Classes,
  JNI;

procedure Java_TestJavaDll_displayHelloWorld(PEnv: PJNIEnv; Obj: JObject;Value: JString); stdcall;
var
  Str: string;
  JVM: TJNIEnv;
begin
    // Create an instance of the Java environment
  JVM := TJNIEnv.Create(PEnv);
  try
    // Convert the JString into a string
    Str := JVM.JStringToString(Value);
    Writeln('Hello !'+Str);
  finally
    JVM.Free;
  end;
end;

exports
  Java_TestJavaDll_displayHelloWorld;

begin
end.
